import { GetServerSideProps, NextPage, PageConfig } from 'next';
import Head from 'next/head';
import { useEffect, useState } from 'react';
import Content from './content';

interface IProps {
	aid: string
}

/**
 * 发布结果
 */
const Page: NextPage<IProps> = ({ aid }) => {
	return (
		<>
			<Head>
				<title>发布结果</title>
			</Head>
			<Content aid={aid} />
		</>
	);
};

export const config: PageConfig = {
	amp: false
};

export default Page;

export const getServerSideProps: GetServerSideProps<IProps> = async (context) => {
	const query = context.query as Record<string, string>;
	return {
		props: {
			aid: query.aid || ''
		}
	};
};
